#include "TcpServer.hpp"
#include <memory>


void Usage(std::string proc)
{
    std::cout << "\n\rUsage: " << proc << " port[1024+]\n" << std::endl;
}

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }

    uint16_t port = stoi(argv[1]);

    log.Enable(Classfile);
    unique_ptr<TcpServer> tcp_sev(new TcpServer(port));

    tcp_sev->Init();
    tcp_sev->Run();

    return 0;
}